//
//  UserServer.h
//  WeCommunity
//
//  Created by mac on 2017/6/20.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import <Foundation/Foundation.h>
#include "ContactModel.h"
#import "ContactVisitRecordModel.h"

@interface UserServer : NSObject

+(UserServer *)shared;

-(ContactModel *)getSelfContact;

#pragma mark - 保存昵称
-(void)saveUserNickName:(NSString *)nickName
               complete:(void(^)(BOOL success,NSString * error,NSString * nickName))complete;

#pragma mark - 保存微信号
-(void)saveUserWXUserName:(NSString *)userName
                 complete:(void(^)(BOOL success,NSString * error,NSString * WXUserName))complete;


#pragma mark - 保存头像
-(void)saveHeadImage:(UIImage*)image
            complete:(void(^)(BOOL success,NSString * error,NSString * imageUrl))complete;

#pragma mark - 保存性别
-(void)saveUserSex:(NSString*)sex
          complete:(void(^)(BOOL success,NSString * error,NSString * sex))complete;

#pragma mark - 增减积分
-(void)addCoins:(NSNumber *)number complete:(void(^)(BOOL success,NSString * error,NSNumber* coins))complete;

#pragma mark - LeanCloud - 注册
-(void)registerUser:(ContactModel *)contact
           complete:(void(^)(BOOL succees,NSString *error,ContactModel * contact))completeBlock;

#pragma mark - LeanCloud - 登录
-(void)LoginWithUser:(ContactModel *)contact
            complete:(void(^)(BOOL succees,NSString *error,ContactModel * contact))completeBlock;

#pragma mark - 退出登录
-(void)logOut;

#pragma mark - 创建一个新的默认用户信息
-(void)creatNewUserComplete:(void(^)(BOOL success,NSString *error))complete;

#pragma mark -  验证session
-(void)verifySessionTokenComplete:(void(^)(BOOL available))complete;

#pragma mark - 拜访某个用户
-(void)mySelfVisitSomePerson:(NSString *)contactId
                    complete:(void(^)(BOOL success ,NSString *error))complete;

#pragma mark - 查询某个用户的拜访记录
-(void)findContactVisitsWithObjectId:(NSString *)contactId
                            complete:(void(^)(BOOL success,NSString *error, ContactVisitRecordModel * resultModel))complete;

@end
